package com.huopaolan.yohuoshop.Mvp.Contract;

import com.huopaolan.lib_core.Mvp.Model.IModel;
import com.huopaolan.lib_core.Mvp.View.IView;
import com.huopaolan.yohuoshop.Bean.BaseEntity;
import com.huopaolan.yohuoshop.Bean.HomeMenuEntity;

import io.reactivex.Observable;

/**
 * 首页订阅接口
 * 要被Presenter关联的IView以及IPresenter
 */
public interface HomeContract {
    //继承自IView的接口对应首页接口返回数据，给界面对应回调显示
    interface IHomeView extends IView {
        void success(BaseEntity baseEntity);
    }

    //继承自IModel的接口对应首页中网络接口请求数据，像Presenter提供，Presenter通过IView设置到界面
    interface IHomeModel extends IModel {
        Observable<HomeMenuEntity> homeMenu();
    }
}
